/**
***
***************************************************************
***	 	Copyright (c) 2016 Queclink Ltd.
***
*** 		dev_mx25_l64.h
*** 		dev mx25f
*** 		johar.xiao
***		2016-11-24
***		AADL LEVEL file
***		FLASH 的读/ 写/ 其他的操作接口,对
**************************************************************
***
**/
#ifndef _FLASH_DEV_MX25L16_H_
#define _FLASH_DEV_MX25L16_H_

#include <flash/flash_cmn.h>

#ifdef __cplusplus
	extern "C"{
#endif

/*函数接口定义*/
const fdrv_adp_t fadp = {\
		.init 			= flash_dev_init,\
		.read 		    = flash_dev_read,\
		.write		    = flash_dev_write,\
		.erase_chip 	= flash_dev_erase_chip,\
		.erase_sector	= flash_dev_erase_sector,\
		.erase_block	= flash_dev_erase_block,\
		.status		    = flash_dev_status,\
		};

/*flash属性*/
const fchip_info_t fchip= {\
		.name 		    = "MX25L16",\
		.capacity 		= SIZE_M(2),\
		.block_size 	    = SIZE_K(64),\
		.sector_size 	= SIZE_K(4),\
		};

 /*flash操作最大的完成时间，单位ms，在芯片手册数值基础上加了20%余量*/
const unsigned int chip_erase_time = 36000;
const unsigned int block_erase_time = 2400;
const unsigned int sector_erase_time = 360;
const unsigned int page_program_time = 6;
const unsigned char manufacturer_id = 0xc2;

#ifdef AADL_FLASH_DESTROY_CHK_USE
p_fun_flash_sector_check_t p_flash_sector_check = flash_if_add_sector_check_node;
#else
p_fun_flash_sector_check_t p_flash_sector_check = NULL;
#endif

#ifdef __cplusplus
	}
#endif

#endif
/**	END FO FILE **/

